package com.itheima.controller;

import com.itheima.pojo.LogQueryParam;
import com.itheima.pojo.PageResult;
import com.itheima.pojo.Result;
import com.itheima.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping
@Slf4j
public class LogController {
    @Autowired
    private LogService logService;

    //5.5 日志列表查询
    @GetMapping("/log/page")
    public Result queryLogList(LogQueryParam logQueryParam) {
        PageResult pageResult = logService.queryLogList(logQueryParam);
        return Result.success(pageResult);
    }
}
